#pragma once
#include "fxcc/core/graph/common/pch.h"
#include "fxcc/core/graph/common/Property.h"
#include "fxcc/core/graph/common/Params.h"
#include <map>
#include <vector>

namespace fxcc
{
    namespace graph
    {
        namespace common
        {

            struct FXCC_API MaterialData :public fxcc::Base
            {
                std::string m_Name;

                std::string m_Dir;

                Params m_Params;

                std::map<std::string, std::string> m_Strings;

                std::map<std::string, std::vector<unsigned char>> m_Buffers;

                struct Paths
                {
                    std::vector<std::string> m_Textures;
                };

                std::map<std::string, Paths> m_Textures;

                MaterialData() = default;

                MaterialData(aiMaterial* mat, const std::string& dir);

                void LoadTextures(aiMaterial* mat, aiTextureType type, const std::string& info);

                bool HasData(const std::string type) const
                {
                    auto it = m_Textures.find(type);
                    return it != m_Textures.end();
                };

                auto tie() const {
                    return std::tie(m_Dir, m_Name);  
                }

                void AddString(const std::string& key, char* data, int dataLen);

                // impl by graph impl

               
            };
        };
    };
};